FROM ubuntu
MAINTAINER var_terry "wutairui.m@gmail.com"
ENV REFRESHED_AT 2017-2-9

RUN apt-get update \
    && apt-get install -y nginx

RUN apt-get -y -q install nginx
RUN apt-get -y -q install curl

RUN mkdir -p /home/wb /home/wb/web

COPY init.sh /home/wb/init.sh
COPY web /home/wb/web/

COPY nginx/global.conf /etc/nginx/conf.d/
COPY nginx/nginx.conf /etc/nginx/nginx.conf

RUN ln -s /home/wb/web /usr/share/nginx/html

RUN chmod +x /home/wb/init.sh 
RUN chmod -R 755 /home/wb/web

EXPOSE 8080

CMD ["/home/wb/init.sh"]
